/*
               File: WPraTra
        Description: Stub for WPraTra
             Author: GeneXus C# Generator version 8_0_0-201
       Generated on: 21 de Setiembre de 2010 17:41:28.56
       Program type: Callable routine
          Main DBMS: sqlserver
*/
namespace GeneXus.Programs {
   using System;
   using System.Collections;
   using GeneXus.Utils;
   using GeneXus.Resources;
   using GeneXus.Application;
   using GeneXus.Metadata;
   using System.Web.Services.Protocols;
   using System.Web.Services;
   using com.genexus;
   using com.genexus.ui;
   using com.genexus.uifactory;
   using GeneXus.Windows;
   using System.Data;
   using System.Data.SqlClient;
   using GeneXus.Data;
   using GeneXus.Data.FAT;
   using GeneXus.Http;
   using GeneXus.Procedure;
   using System.Threading;
   using System.Xml.Serialization;
   using GeneXus.XML;
   using GeneXus.Encryption;
   using GeneXus.Http.Client;
   public class wwpratra_wrapper : GXJWin
   {
      public wwpratra_wrapper( int hnd ,
                               ModelContext jContext ) : base(hnd, jContext)
      {
      }

   }

   public class wwpratra : GXWinProcedure
   {
      public wwpratra( int hnd ,
                       ModelContext jContext ) : base(hnd, jContext)
      {
         IsMain = true;
         context = new GxContext();
         context.DataStores.Add(new GxDataStore( new GxSqlServer(),"Default"));
         dsDefault = context.GetDataStore("Default") ;
      }

      public wwpratra( )
      {
         context = new GxContext();
         context.DataStores.Add(new GxDataStore( new GxSqlServer(),"Default"));
         dsDefault = context.GetDataStore("Default") ;
         IsMain = true;
      }

      public wwpratra( IGxContext context ) : base(-1, null)
      {
         this.context = context;
         IsMain = false;
         dsDefault = context.GetDataStore("Default") ;
      }

      public wwpratra( IGxContext context ,
                       int hnd ,
                       ModelContext jContext ) : base(hnd, jContext)
      {
         this.context = context;
         IsMain = false;
         dsDefault = context.GetDataStore("Default") ;
      }

      public void execute( ref String aP0_Usucod )
      {
         this.AV2Usucod = aP0_Usucod;
         initialize();
         executePrivate();
         aP0_Usucod=this.AV2Usucod;
      }

      public void executeSubmit( ref String aP0_Usucod )
      {
         wwpratra objwwpratra;
         objwwpratra = new wwpratra();
         objwwpratra.AV2Usucod = aP0_Usucod;
         objwwpratra.initialize();
         Thread execThread;
         execThread = new Thread(new ThreadStart( objwwpratra.executePrivate ));
         execThread.Start();
         aP0_Usucod=this.AV2Usucod;
      }

      void executePrivate( )
      {
         /* GeneXus formulas */
         /* Output device settings */
         args = new Object[] {(String)AV2Usucod} ;
         ClassLoader.Execute("uwpratra","GeneXus.Programs.uwpratra", new Object[] {context, remoteHandle, jContext }, "execute", args);
         AV2Usucod = (String)(args[0]) ;
         this.cleanup();
      }

      public override int getOutputType( )
      {
         return GxReportUtils.OUTPUT_RVIEWER_DLL ;
      }

      protected void cleanup( )
      {
         this.AV2Usucod = AV2Usucod;
      }

      public override void initialize( )
      {
         /* GeneXus formulas. */
         Gx_err = 0 ;
      }

      private short Gx_err ;
      private String AV2Usucod ;
      private IGxDataStore dsDefault ;
      private String aP0_Usucod ;
      private Object[] args ;
   }

}
